<?php echo $this->render('/public/header'); ?>
    <div id="main" class="col-lg-12 col-md-12 col-sm-12">
        <div class="col-lg-5 col-md-5 col-xs-5">
            <ul class="list-group">
                <?php foreach ($list as $k => $v): ?>
                    <li class="list-group-item">
                        <a href="/table/order?invoice=<?php echo $v['invoice']; ?>"><?php echo $v['invoice']; ?></a>应收款:
                        <span style="color:green"><?php echo $v['need_pay']; ?></span>
                        ;已收款:<span style="color:blue"><?php echo $v['have_pay']; ?></span>
                    </li>
                <?php endforeach; ?>
                <li class="list-group-item" style="background-color:deepskyblue">
                    总计应收--<?php echo array_sum(array_column($list, 'need_pay')); ?>
                    总收款--<?php echo array_sum(array_column($list, 'have_pay')); ?>
                </li>
            </ul>
        </div>
    </div>
<?php echo $this->render('/public/footer'); ?>